<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>陌陌酒店平台</title>
    <!-- Stylesheets -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/revolution-slider.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!--Favicon-->
    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
    <link rel="icon" href="images/favicon.ico" type="image/x-icon">

    <!-- Responsive -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="css/responsive.css" rel="stylesheet">
    <script type="text/javascript" src="jquery/jquery-2.1.1.min.js"></script>

    <link rel="stylesheet" href="wangeditor/css/wangEditor.min.css">
    <script src="wangeditor/js/wangEditor.min.js"></script>
</head>


<body>
<div class="page-wrapper">

    <header class="header" id="header"></header>
    <script type="text/javascript">
        /*引入Header部分公共代码*/
        $(function(){
            $.ajax({
                type:"get",
                url:"header.html",
                async:true,
                success:function(data){
                    $("#header").html(data);
                }
            });
        });
    </script>
    

    <!-- main header area end -->

     <!--Page Title-->
    <section class="page-title text-center">
        <div class="auto-container">
            <div class="content-box">
                <div class="title">新闻发布</div>
                <ul class="bread-crumb">
                    <li><a href="index.html">主页<i class="fa fa-angle-right"></i></a></li>
                    <li>新闻发布</li>
                </ul>
            </div>
        </div>
    </section>
    <!--End Page Title-->

    <!-- News Add -->
    <div style="width: 60%;height: 60%; margin: auto;padding: 10px" >
        <h3 style="display: inline">新闻标题:</h3>
        <input type="text" style="border: solid;"/>
        <h3>新闻内容:</h3>
        <div id="editor"></div>
        <input type="button" id="html" value="发表新闻"/>
    </div>
    <!--<input type="button" id="text" value="获取text"/>-->

    <script>
        var E = window.wangEditor;
        var editor = new E('#editor'); // 两个参数也可以传入 elem 对象，class 选择器
        //开启debug模式
        editor.customConfig.debug = true;
        // 关闭粘贴内容中的样式
        editor.customConfig.pasteFilterStyle = false;
        // 忽略粘贴内容中的图片
        editor.customConfig.pasteIgnoreImg = false;
        // 使用 base64 保存图片
        //editor.customConfig.uploadImgShowBase64 = true
        // 上传图片到服务器
        editor.customConfig.uploadFileName = 'editorFile'; //设置文件上传的参数名称
        editor.customConfig.uploadImgServer = 'wangEditor'; //设置上传文件的服务器路径
        editor.customConfig.uploadImgMaxSize = 3 * 1024 * 1024; // 将图片大小限制为 3M
        //自定义上传图片事件
        editor.customConfig.uploadImgHooks = {
            before: function(xhr, editor, files) {

            },
            success: function(xhr, editor, result) {
                console.log("上传成功");
            },
            fail: function(xhr, editor, result) {
                console.log("上传失败,原因是" + result);
            },
            error: function(xhr, editor) {
                console.log("上传出错");
            },
            timeout: function(xhr, editor) {
                console.log("上传超时");
            }
        }

        editor.create();
        $("#html").bind("click",function(){
            var src = editor.txt.html();
            alert(src);
        });
        $("#text").bind("click",function(){
            var src = editor.txt.text();
            alert(src);
        });
    </script>
    <!-- News Add end -->


    <!--页眉-->
    <div class="footer" id="footer" ></div>
    <script type="text/javascript">
        /*引入Header部分公共代码*/
        $(function(){
            $.ajax({
                type:"get",
                url:"footer.html",
                async:true,
                success:function(data){
                    $("#footer").html(data);
                }
            });
        });
    </script>

</div>
<!--End pagewrapper-->



<!--Scroll to top-->
<div class="scroll-to-top scroll-to-target" data-target=".main-header"><span class="icon fa fa-angle-up"></span></div>


<!-- jQuery js -->

<script src="js/map-script.js"></script>
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.themepunch.tools.min.js"></script>
<script src="js/jquery.themepunch.revolution.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.slideanims.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.layeranimation.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.navigation.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.kenburn.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.actions.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.parallax.min.js"></script>
<script type="text/javascript" src="js/revolution.extension.migration.min.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/owl.carousel.min.js"></script>
<script type="text/javascript" src="js/jquery.appear.js"></script>
<script type="text/javascript" src="js/jquery.countTo.js"></script>
<script src="js/isotope.js"></script>
<script src="js/jquery.fancybox.pack.js"></script>
<script src="js/jquery.fancybox-media.js"></script>
<script src="js/owl.js"></script>
<script src="js/masterslider.js"></script>
<script type="text/javascript" src="js/jquery.polyglot.language.switcher.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script type="text/javascript" src="js/jquery.mixitup.min.js"></script>
<script src="js/validate.js"></script>
<script src="js/wow.js"></script>
<script src="js/script.js"></script>    
<script type="text/javascript" src="js/theme.js"></script>

<script src="js/timePicker.js"></script>
<script src="js/jquery-ui.js"></script>

<script src="js/validation.js"></script>


<!-- End of .page_wrapper -->

</body>
</html>
